package com.neuedu.javase.api;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-28 11:09
 * 描述 :
 */
public class Teacher {
    private String name;
    private Integer age;
    private boolean isSuccess;
    private Boolean isSuccess2;
    private Double sal;



    //对属性的处理进行封装  setter getter 
//    public void setName(String name){
//        if(name == null){
//            name = "";
//        }
//        this.name = name;
//    }
//
//    public String getName(){
//        return this.name;
//    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getSal() {
        return sal;
    }

    public void setSal(Double sal) {
        this.sal = sal;
    }

    //基础类型的 get方法 默认是isXXXX
    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public Boolean getSuccess2() {
        return isSuccess2;
    }

    public void setSuccess2(Boolean success2) {
        isSuccess2 = success2;
    }
}
